#pragma once
#include "stdafx.h"
#include <cassert>

enum ORDER {INCREASING, DECREASING};

template<class KType, class DType, ORDER order = INCREASING>
struct priority_structure
{	
	enum ORDER {INCREASING, DECREASING};	
private:
	KType key;
	DType data;
public:
	const KType& Key() const
	{
		return key;
	}
	const DType& Data() const
	{
		return data;
	}
public:
	priority_structure(KType key, DType data) : key(key), data(data){}
	~priority_structure(void){}

	bool operator<(const priority_structure& other) const
	{
		if (order == DECREASING)
			return key < other.key;
		if (order == INCREASING)
			return key > other.key;
		assert(false);
	}

};
